package org.langqiao.io.file;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

public class TongJiProvince {
	public static void main(String[] args) throws IOException{
		File file = new File("F:/province.txt");
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
			String str = null;
			String s = "",s1 ="";
			while((str=br.readLine())!=null){
				System.out.println(str);
				String[] strs = str.split("\t");
				//if(s.toString().length()>0){
					//s.append(strs[0]).append(",");
				//}
				//else{
			    //s.append(strs[0]);
				//}
				strs[1]=strs[1].trim();
				s = s+strs[1]+",";
				//s1 =s1+strs[1]+",";
			}
			System.out.println(s);
			//System.out.println(s1);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

}
